const Mock = require('mockjs')

module.exports = () => {
  const data = Mock.mock({
    'list|50': [
      {
        'id|+1': 1,
        name: '@cname()',
        address: '@city(true)',
        grade: '@integer(30,100)',
      },
    ],
    'cart|50': [
      {
        'id|+1': 1,
        goodsName: '@name',
        img: '@image(150x200, @color(),@city())',
        count: '@integer(1,100)',
      },
    ],
    'book|50': [
      {
        'bookId|+1': 1,
        bookName: '@name',
        img: '@image(150x200, @color(),@city())',
        count: '@integer(1,100)',
      },
    ],
    'cartData|50': [
      {
        'id|+1': 1,
        goodsName: 'iphone 13' + '@name',
        img: '@image(150x200, @color(), @city(true))',
        count: '@integer(1, 100)',
        price: '@integer(10, 200)',
        checked: false,
        createTime: '@date()',
      },
    ],
  })
  return data
}
